const path = require('path');
const A = require('./src/plugins/a');

module.exports = {
    mode: '.env.development',
    entry: './src/main.js',
    output: {
        filename: 'bundle.js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
        rules: [
            {
                test: /\.less$/,
                // use: ['style-loader', 'css-loader', 'less-loader']
                use: [
                    {
                        loader: path.resolve(__dirname, './src/loader/styleLoader.js'),
                        options: {
                            name: 'styleLoader01',
                            age: 19
                        }
                    },
                    {
                        loader: path.resolve(__dirname, './src/loader/cssLoader.js'),
                        options: {
                            name: 'cssLoader',
                            age: 20
                        }
                    },
                    path.resolve(__dirname, './src/loader/lessLoader.js')
                ]
            }
        ]
    },
    plugins: [
        new A()
    ]
}